#include <stdio.h> 

int main()
{
	int a = 0;
	char digit[20];
	int digitNum = 0;
	scanf("%d", &a);
	while ( a != 0 ) {
		digit[digitNum ++] = a % 10;
		a = a / 10;
	}
	printf("%d\n", digitNum);
	for ( int i = digitNum - 1; i >= 0; i-- ) {
		printf("%d\n",digit[i]);
	}
	return 0;
}
